package group2assignone.ucm.manager;

import group2assignone.ucm.UCController;
import group2assignone.view.manager.EditFlightView;
import group2assignone.view.manager.ManagerView;

/**
 * use case controller to cancel editing a flight
 * @author group2
 */
public class UCEditFlightCancel implements UCController {

    private EditFlightView editView = new EditFlightView();

    /**
     * sets view
     * @param eView
     */
    public UCEditFlightCancel(EditFlightView eView) {
        editView = eView;
    }

    @Override
    public void run() {
        //go back to main screen without saving changes
        editView.dispose();
        ManagerView mv = ManagerView.getInstance();
        mv.setVisible(true);
    }
}
